from django.conf.urls import url
from book.views import index,detail,yuan,jump,cook,getcook,set_session,get_session,LoginView,CenterView,Homeview

urlpatterns = [
      # 匹配`testproject/`成功就调用`views`中的`testproject`函数
    url(r'^index$', Homeview.as_view()),
    url(r'^1/100$',detail),
    url(r'^yuan$',yuan),
    url(r'^jump$',jump),
    url(r'^(?P<category_id>\d+)/(?P<book_id>\d+)/$',detail),#进行正则分组的参数会传递给函数

    url(r'^cook/$',cook),
    url(r'^getcook',getcook),
    url(r'^set_session', set_session),
    url(r'get_session',get_session),
    url(r'^login/$',LoginView.as_view()),


    url(r'center/$',CenterView.as_view()),

]

